package com.kaluli.project.repository.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.kaluli.project.domain.entity.KllHupuApiMVO;
import com.kaluli.project.domain.entity.KllHupuApiWVO;
import com.kaluli.project.domain.repository.KllHupuApiMVORepository;
import com.kaluli.project.domain.repository.KllHupuApiWVORepository;
import com.kaluli.system.repository.AbstractRepositorySupport;

@Repository
public class KllHupuApiWVORepositoryImpl extends AbstractRepositorySupport<KllHupuApiWVO> implements KllHupuApiWVORepository {

	@Override
	protected Class<KllHupuApiWVO> getEntityClass() {
		// TODO Auto-generated method stub
		return KllHupuApiWVO.class;
	}


	@Override
	public List<KllHupuApiWVO> findListByjson() {
		StringBuffer sql = new StringBuffer(
				"SELECT kll_hupu_id as id,kll_hupu_title as title , '卡路里运动营养' as come,kll_hupu_time as time,kll_hupu_url as detail_url");
		sql.append(" FROM kll_hupu_apicontent ");
		sql.append("  WHERE kll_hupu_status =0 and kll_hupu_type = 2 and DATE(kll_hupu_time) = CURDATE() limit 10 ");
		List<KllHupuApiWVO> list = excuteSql(sql.toString());
		return list;
	}

}
